<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css常用样式</title>
    <style>
        .box1 {
            width: 400px;
            height: 400px;
            /* background-color: pink;
            background-image: url('../img/11.jpg');
            background-repeat: no-repeat;
            background-position: center; */
            background: pink url(../img/22.jpg) no-repeat center;

            background-size: cover;
        }
    </style>
</head>

<body>
    <div class="box1"></div>
</body>

</html>